<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1" import="java.util.*,erp.education.server.db.entites.setup.school.Branchs"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>School Register Form</title>
 <link rel="stylesheet" href="css/default.css"/>
<link rel="stylesheet" href="css/<%=session.getAttribute("cssView")%>/jquery-ui.css"/>
 <script type="text/javascript">
 $(document).ready(function(){
 defaultFunction();
 ui();
 jGrid();
 
 })
 </script>
<script type="text/javascript" src="js/setup/stream.js"></script>
</head>

<body>
<%
List result=(List)request.getAttribute("result");
List<Branchs> branchs=(List<Branchs>)result.get(0);
List<Object[]> gridData=(List<Object[]>)result.get(1);
%>
<div class="pageHeader">Stream details</div>
<div class="content">
 <div class="form">
<form name="streamDetails" action="saveSchoolDetails">

<table class="form" cellpadding="0" cellspacing="0" >
<tr>
  <td>Select branch  : </td>
  <td colspan="6"><select name="branchId" notNull msg="Select branch">
  <option value="-1">Select</option>
  <% for(Branchs branch:branchs){%>
  <option value="<%=branch.getBranchId() %>"><%=branch.getBranchName() %></option>
  <% }%>
  </select><input name="streamId" value="-1" class="hide"/></td></tr>
<tr >
  <td >Stream name : </td>
  <td colspan="6"><input type="text" name="streamName" notNull msg="Enter stream name" /></td></tr>
 
<tr><td colspan="7"><input type="button" value="Save" onclick="stream.saveupdate();" /><input type="reset" value="Clear" /></td></tr>
</table>

</form> 
</div>
<br />
<div class="grid_holder">
<a href="#" navigate onclick="return false" style="text-decoration:none" >
<table navigate class="grid" cellpadding="0" cellspacing="0" onDelete="stream.removeStream()" onEdit="stream.editStream()" searchAction="addstream.action">
<thead>
<tr>
 <th></th>
<th class="hide">School Id</th>
 
<th>School Name</th>
<th class="hide">Branch Id </th>
<th>Branch Name </th>
<th class="hide">Stream Id</th>
<th>Stream Name</th>
 
<th></th>
<th></th>
</tr>
</thead>

<tbody>
<%
 
for(Object[] row:gridData){
%>
<tr active='N' >
 <td>&nbsp;&nbsp;</td>
  <td class="hide" field="schoolId" edit="false"><%=row[0] %></td>
  
  <td field="schoolName"><%=row[1] %></td>
  <td class="hide" field="branchId" edit="false" ><%=row[2] %></td>
  <td field="branchName"><%=row[3] %></td>
     <td field="streamId" class="hide"><%=row[4] %></td>
  <td field="streamName"><%=row[5] %></td>
   
  <td width="16"><span class="ui-icon ui-icon-pencil"></span></td>
  <td width="16"><span class="ui-icon ui-icon-trash"></span></td>
</tr>
 <%} %>
</tbody></table>
</a>
</div>
</div>
</body>
</html>
